<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>媒体播放设置</title>
	<link rel="stylesheet" type="text/css" href="UI/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="UI/css/main.css"/>
    <script type="text/javascript" src="UI/js/libs/modernizr.min.js"></script>
    <link href="UI/users/bootstrap/css/bootstrap.min.css" rel="stylesheet">
   	<script src="UI/users/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
function validatePlayMedia(){
	var startHoursId=document.getElementById("startHoursId");
	var startMinutesId=document.getElementById("startMinutesId");
	var startSecondsId=document.getElementById("startSecondsId");
	var endHoursId=document.getElementById("endHoursId");
	var endMinutesId=document.getElementById("endMinutesId");
	var endSecondsId=document.getElementById("endSecondsId");
	if(startHoursId.value!="-1"){	
		if(startMinutesId.value!="-1"){	
			if(startSecondsId.value!="-1"){	
				if(endHoursId.value!="-1"){	
					if(endMinutesId.value!="-1"){	
						if(endSecondsId.value!="-1"){	
							return true;
						}else{
							alert("播放时间请设置正确");
							return false;
						}
					}else{
						alert("播放时间请设置正确");
						return false;
					}
				}else{
					alert("播放时间请设置正确");
					return false;
				}
			}else{
				alert("播放时间请设置正确");
				return false;
			}
		}else{
			alert("播放时间请设置正确");
			return false;
		}
		
	}else{
		alert("播放时间请设置正确");
		return false;
	}
	
}
</script>   	
</head>


<body>
 <s:if test="null==#session.account">
	<s:a href="login.action" align="center"><h2>您不能直接访问网站内部页面,请先登录!</h2></s:a>
</s:if>
<s:else>
	    <s:if test="msg!=null">
	    	<script type="text/javascript">
	    		var message="${msg}";
	    		alert(message);
	    	</script>
	    </s:if>
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i>
            <span class="crumb-name">首页</span><span class="crumb-step">&gt;</span>
            <span class="crumb-name">媒体管理</span><span class="crumb-step">&gt;</span>
            <span>媒体播放设置</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="playMedia" method="post" id="" onsubmit="return validatePlayMedia()"  name="" enctype="multipart/form-data">
                <s:hidden name="media.id"></s:hidden>
                    <table class="insert-tab" width="100%">
                        <tbody>
	                        <tr>
	                            <th width="120"><i class="require-red">*</i>视频名：</th>
	                            <td>
	                                <s:textfield name="media.filename" id="meida.filename" class="common-text required" type="text" size="50" readonly="true"></s:textfield>
	                            </td>
	                        </tr>
                            <tr>
                                <th><i class="require-red">*</i>开始时间：</th>
                                <td>
                                     <s:select headerKey="-1" headerValue="时" name="startHoursId" 
                                     list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}"/>
									<span>时</span><span>&nbsp;&nbsp;</span>
									
                                	<s:select headerKey="-1" headerValue="分" name="startMinutesId" 
                                	list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}" />
                                	<span>分</span><span>&nbsp;&nbsp;</span>
                                
                                	<s:select headerKey="-1" headerValue="秒" name="startSecondsId" 
                                	list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}"/>
                                	<span>秒</span><span>&nbsp;&nbsp;</span> 
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>结束时间：</th>
                                <td>
                                     <s:select headerKey="-1" headerValue="时" name="endHoursId" 
                                     list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}"/>
                                     <span>时</span><span>&nbsp;&nbsp;</span>
                                	<s:select headerKey="-1" headerValue="分" name="endMinutesId" 
                                	list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}"/>
                                	<span>分</span><span>&nbsp;&nbsp;</span>
                                	<s:select headerKey="-1" headerValue="秒" name="endSecondsId" 
                                	list="#{'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'9','10':'10',
                                     '11':'11','12':'12','13':'13','14':'14','15':'15','16':'16','17':'17','18':'18',
                                     '19':'19','20':'20','21':'21','22':'22','23':'23'}"/>
                                	<span>秒</span><span>&nbsp;&nbsp;</span>
                                </td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="确认" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
</s:else> 
</body>
</html>